USE [QuanLyKho]
GO

/****** Object:  Table [dbo].[ChotSo]    Script Date: 01/23/2013 11:27:38 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[ChotSo](
	[IdChotSo] [int] IDENTITY(1,1) NOT NULL,
	[MaThuoc] [varchar](20) NOT NULL,
	[SoLo] [varchar](20) NULL,
	[SLTonDauKy] [int] NOT NULL,
	[TTTonDauKy] [money] NOT NULL,
	[SLNhapTrongKy] [int] NOT NULL,
	[TTNhapTrongKy] [money] NOT NULL,
	[SLXuatTrongKy] [int] NOT NULL,
	[TTXuatTrongKy] [money] NOT NULL,
	[TTXuatVon] [money] NOT NULL,
	[SLTonCuoiKy] [int] NOT NULL,
	[TTTonCuoiKy] [money] NOT NULL,
	[NgayChotSo] [datetime] NOT NULL,
 CONSTRAINT [PK_ChotSo] PRIMARY KEY CLUSTERED 
(
	[IdChotSo] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[ChotSo]  WITH CHECK ADD  CONSTRAINT [FK_ChotSo_Dm_Thuoc] FOREIGN KEY([MaThuoc])
REFERENCES [dbo].[Dm_Thuoc] ([MaThuoc])
GO

ALTER TABLE [dbo].[ChotSo] CHECK CONSTRAINT [FK_ChotSo_Dm_Thuoc]
GO


